package com.example.project3;

import static com.example.project3.Calculator.calculate;
import static com.example.project3.Calculator.expressionToList;
import static com.example.project3.Calculator.parseToSuffixExpression;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.project3.databinding.ActivityMainBinding;

import java.util.ArrayList;
import java.util.List;
import java.util.Stack;

public class MainActivity extends AppCompatActivity {

    private CalculatorViewModel calculatorViewModel;
    ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
        calculatorViewModel = new ViewModelProvider(this,
                ViewModelProvider.AndroidViewModelFactory.getInstance(getApplication())).get(CalculatorViewModel.class);
        binding.setCalViewModel(calculatorViewModel);
        binding.setLifecycleOwner(this);
    }
}